<?php
class Home extends CI_Controller{
    function  __construct(){
        parent::__construct();
        $this->load->library(array('form_validation','session','user_libs'));
        $this->load->helper(array( 'url','form'));
        
        // Kiem tra da dang nhap tu frontend hay chua. 
        // Kiem tra co phai la admin khong
        if(!$this->user_libs->isLogin() || !$this->user_libs->isAdmin()){
            redirect(base_url().'backend/login');
            exit();
        }
    }
    function index(){
        $data['page'] = 'backend/home';
        $this->load->view('backend/temp',$data);
    }
}